Mpc-Based Controller With Terrain Insight For Dynamic Legged Locomotion